home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / shmem_iput.z / shmem_iput
Encoding:
Text File  |  2002-10-03  |  18.0 KB  |  184 lines

  1.  
  2. SHMEM_IPUT(3)                                                 SHMEM_IPUT(3)
  3.  
  4.  
  5. NNNNAAAAMMMMEEEE
  6.      sssshhhhmmmmeeeemmmm____ccccoooommmmpppplllleeeexxxx____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____iiiippppuuuutttt,
  7.      sssshhhhmmmmeeeemmmm____iiiinnnntttt____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____iiiinnnntttteeeeggggeeeerrrr____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt4444, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt8888,
  8.      sssshhhhmmmmeeeemmmm____iiiippppuuuutttt33332222, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt66664444, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt111122228888, sssshhhhmmmmeeeemmmm____llllooooggggiiiiccccaaaallll____iiiippppuuuutttt,
  9.      sssshhhhmmmmeeeemmmm____lllloooonnnngggg____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____lllloooonnnnggggddddoooouuuubbbblllleeee____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____iiiippppuuuutttt,
  10.      sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____iiiippppuuuutttt - Transfer strided data to a
  11.      specified processing element (PE).
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      C or C++:
  15.  
  16.         ####iiiinnnncccclllluuuuddddeeee <<<<mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh>>>>
  17.  
  18.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____iiiippppuuuutttt((((ddddoooouuuubbbblllleeee ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt ddddoooouuuubbbblllleeee ****_s_o_u_r_c_e,,,,
  19.         ppppttttrrrrddddiiiiffffffff____tttt _t_s_t,,,, ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  20.  
  21.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____iiiippppuuuutttt((((ffffllllooooaaaatttt ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt ffffllllooooaaaatttt ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt
  22.         _t_s_t,,,, ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  23.  
  24.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____iiiinnnntttt____iiiippppuuuutttt((((iiiinnnntttt ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt iiiinnnntttt ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt _t_s_t,,,,
  25.         ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  26.  
  27.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____iiiippppuuuutttt33332222((((vvvvooooiiiidddd ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt vvvvooooiiiidddd ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt _t_s_t,,,,
  28.         ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  29.  
  30.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____iiiippppuuuutttt66664444((((vvvvooooiiiidddd ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt vvvvooooiiiidddd ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt _t_s_t,,,,
  31.         ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  32.  
  33.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____iiiippppuuuutttt111122228888((((vvvvooooiiiidddd ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt vvvvooooiiiidddd ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt _t_s_t,,,,
  34.         ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  35.  
  36.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggg____iiiippppuuuutttt((((lllloooonnnngggg ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt lllloooonnnngggg ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt
  37.         _t_s_t,,,, ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  38.  
  39.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnnggggddddoooouuuubbbblllleeee____iiiippppuuuutttt((((lllloooonnnngggg ddddoooouuuubbbblllleeee ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt lllloooonnnngggg ddddoooouuuubbbblllleeee
  40.         ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt _t_s_t,,,, ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  41.  
  42.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____iiiippppuuuutttt((((lllloooonnnngggg lllloooonnnngggg ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt lllloooonnnngggg lllloooonnnngggg
  43.         ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt _t_s_t,,,, ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  44.  
  45.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____iiiippppuuuutttt((((sssshhhhoooorrrrtttt ****_t_a_r_g_e_t,,,, ccccoooonnnnsssstttt sssshhhhoooorrrrtttt ****_s_o_u_r_c_e,,,, ppppttttrrrrddddiiiiffffffff____tttt
  46.         _t_s_t,,,, ppppttttrrrrddddiiiiffffffff____tttt _s_s_t,,,, ssssiiiizzzzeeee____tttt _l_e_n,,,, iiiinnnntttt _p_e))));;;;
  47.  
  48.      Fortran:
  49.  
  50.         IIIINNNNTTTTEEEEGGGGEEEERRRR _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e
  51.  
  52.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____CCCCOOOOMMMMPPPPLLLLEEEEXXXX____IIIIPPPPUUUUTTTT((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  53.  
  54.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____DDDDOOOOUUUUBBBBLLLLEEEE____IIIIPPPPUUUUTTTT((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  55.  
  56.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTTEEEEGGGGEEEERRRR____IIIIPPPPUUUUTTTT((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  57.  
  58.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIIPPPPUUUUTTTT4444((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  59.  
  60.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIIPPPPUUUUTTTT8888((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  61.  
  62.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIIPPPPUUUUTTTT33332222((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  63.  
  64.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIIPPPPUUUUTTTT66664444((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  65.  
  66.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIIPPPPUUUUTTTT111122228888((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  67.  
  68.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____LLLLOOOOGGGGIIIICCCCAAAALLLL____IIIIPPPPUUUUTTTT((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  69.  
  70.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL____IIIIPPPPUUUUTTTT((((_t_a_r_g_e_t,,,, _s_o_u_r_c_e,,,, _t_s_t,,,, _s_s_t,,,, _l_e_n,,,, _p_e))))
  71.  
  72. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  73.      The iput routines provide a high-performance method for copying a
  74.      strided array from the local PE to a contiguous data object on a
  75.      different PE.  The routines return when the data has been copied out
  76.      of the source array on the local PE but not necessarily before the
  77.      data has been delivered to the remote data object.
  78.  
  79.      The arguments are as follows:
  80.  
  81.      _t_a_r_g_e_t    Array to be updated on the remote PE.  This data object must
  82.                be remotely accessible.
  83.  
  84.      _s_o_u_r_c_e    Array containing the data to be copied.
  85.  
  86.      _t_s_t       The stride between consecutive elements of the _t_a_r_g_e_t array.
  87.                The stride is scaled by the element size of the _t_a_r_g_e_t
  88.                array.  A value of 1 indicates contiguous data.  _t_s_t must be
  89.                of type integer.  If you are using Fortran, it must be a
  90.                default integer value.
  91.  
  92.      _s_s_t       The stride between consecutive elements of the _s_o_u_r_c_e array.
  93.                The stride is scaled by the element size of the source
  94.                array.  A value of 1 indicates contiguous data.  _s_s_t must be
  95.                of type integer.  If you are using Fortran, it must be a
  96.                default integer value.
  97.  
  98.      _l_e_n       Number of elements in the _t_a_r_g_e_t and _s_o_u_r_c_e arrays.  _l_e_n
  99.                must be of type integer.  If you are using Fortran, it must
  100.                be a constant, variable, or array element of default integer
  101.                type.
  102.  
  103.      _p_e        PE number of the remote PE.  _p_e must be of type integer.  If
  104.                you are using Fortran, it must be a constant, variable, or
  105.                array element of default integer type.
  106.  
  107.      The _t_a_r_g_e_t and _s_o_u_r_c_e data objects must conform to typing constraints,
  108.      which are as follows:
  109.  
  110.      RRRRoooouuuuttttiiiinnnneeee                       DDDDaaaattttaaaa TTTTyyyyppppeeee ooooffff _t_a_r_g_e_t aaaannnndddd _s_o_u_r_c_e
  111.  
  112.      sssshhhhmmmmeeeemmmm____iiiippppuuuutttt33332222, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt4444     Any noncharacter type that has a storage
  113.                                    size equal to 32 bits.
  114.  
  115.      sssshhhhmmmmeeeemmmm____iiiippppuuuutttt66664444, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt8888     Any noncharacter type that has a storage
  116.                                    size equal to 64 bits.
  117.  
  118.      sssshhhhmmmmeeeemmmm____iiiippppuuuutttt111122228888                 Any noncharacter type that has a storage
  119.                                    size equal to 128 bits.
  120.  
  121.      sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____iiiippppuuuutttt              Elements of type short.
  122.  
  123.      sssshhhhmmmmeeeemmmm____iiiinnnntttt____iiiippppuuuutttt                Elements of type int.
  124.  
  125.      sssshhhhmmmmeeeemmmm____lllloooonnnngggg____iiiippppuuuutttt               Elements of type long.
  126.  
  127.      sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____iiiippppuuuutttt           Elements of type long long.
  128.  
  129.      sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____iiiippppuuuutttt              Elements of type float.
  130.  
  131.      sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____iiiippppuuuutttt             Elements of type double.
  132.  
  133.      sssshhhhmmmmeeeemmmm____lllloooonnnnggggddddoooouuuubbbblllleeee____iiiippppuuuutttt         Elements of type long double.
  134.  
  135.      SSSSHHHHMMMMEEEEMMMM____CCCCOOOOMMMMPPPPLLLLEEEEXXXX____IIIIPPPPUUUUTTTT            Elements of type complex of default
  136.                                    size.
  137.  
  138.      SSSSHHHHMMMMEEEEMMMM____DDDDOOOOUUUUBBBBLLLLEEEE____IIIIPPPPUUUUTTTT ((((FFFFoooorrrrttttrrrraaaannnn))))   Elements of type double precision.
  139.  
  140.      SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTTEEEEGGGGEEEERRRR____IIIIPPPPUUUUTTTT            Elements of type integer.
  141.  
  142.      SSSSHHHHMMMMEEEEMMMM____LLLLOOOOGGGGIIIICCCCAAAALLLL____IIIIPPPPUUUUTTTT            Elements of type logical.
  143.  
  144.      SSSSHHHHMMMMEEEEMMMM____RRRREEEEAAAALLLL____IIIIPPPPUUUUTTTT               Elements of type real.
  145.  
  146.      If you are using Fortran, data types must be of default size.  For
  147.      example, a real variable must be declared as RRRREEEEAAAALLLL, RRRREEEEAAAALLLL****4444 or
  148.      RRRREEEEAAAALLLL((((KKKKIIIINNNNDDDD====4444)))).
  149.  
  150. NNNNOOOOTTTTEEEESSSS
  151.      See iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3) for a definition of the term _r_e_m_o_t_e_l_y _a_c_c_e_s_s_i_b_l_e.
  152.  
  153. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  154.      Consider the following simple sssshhhhmmmmeeeemmmm____lllloooonnnngggg____iiiippppuuuutttt example for C/C++
  155.      programs.
  156.  
  157.           #include <mpp/shmem.h>
  158.           main()
  159.           {
  160.              short source[10] = { 1, 2, 3, 4, 5,
  161.                                   6, 7, 8, 9, 10 };
  162.              static short target[10];
  163.              start_pes(2);
  164.              if (_my_pe() == 0) {
  165.                 /* put 10 words into target on PE 1 */
  166.                 shmem_short_iput(target, source, 1, 2, 5, 1);
  167.              }
  168.              shmem_barrier_all();   /* sync sender and receiver */
  169.              if (_my_pe() == 1) {
  170.                 shmem_udcflush();
  171.                 printf("target on PE %d is %d %d %d %d %d0, _my_pe(),
  172.                 (int)target[0], (int)target[1], (int)target[2],
  173.                 (int)target[3], (int)target[4] );
  174.              }
  175.              shmem_barrier_all();   /* sync before exiting */
  176.           }
  177.  
  178. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  179.      iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3), sssshhhhmmmmeeeemmmm____iiiiggggeeeetttt(3), sssshhhhmmmmeeeemmmm____iiiixxxxppppuuuutttt(3), sssshhhhmmmmeeeemmmm____ppppuuuutttt(3),
  180.      sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt(3) sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh(3), sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh____lllliiiinnnneeee(3)
  181.  
  182.      _M_e_s_s_a_g_e _P_a_s_s_i_n_g _T_o_o_l_k_i_t: _M_P_I _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l
  183.  
  184.